/*
 * @Author: saber
 * @Date: 2021-11-02 16:37:32
 * @LastEditTime: 2022-06-01 10:24:34
 * @LastEditors: mayijun
 * @Description: 这是一个预设值
 */

import SaberHTTP from './SaberHttp';
import authToken from './authToken';
import responseHandler from './responseHandler';
import qs from 'qs';

const custom_http = new SaberHTTP({
  //统一处理get传参是数组的，不要注释
  paramsSerializer: function (params: any) {
    return qs.stringify(params, { indices: false }); // param=value1&param=value2
  }
});
custom_http.use(responseHandler);
custom_http.use(authToken);
export default custom_http;
